package day08.Practice;

import java.util.Arrays;

public class test01 {
    public static void main(String[] args) {
        int[] arr={1,3,4,2,6,3};
        System.out.println(Arrays.toString(sor01(arr)));
    }
    public  static int[]sor01(int[] arr){
        if(arr==null||arr.length==0){
            return new int[]{-1};
        }
        for (int i = 0; i <arr.length ; i++) {
            for (int j = i+1; j <arr.length ; j++) {
                if (arr[i]>arr[j]){
                    arr[i]=arr[i]^arr[j];
                    arr[j]=arr[i]^arr[j];
                    arr[i]=arr[i]^arr[j];
                }

            }

        }

        return arr ;
    }
////    public static int[] sort02(int[] ar){
////        if ()
////        return ;
//    }

}
